<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			.active{
				color: #FF0000;
			}
		</style>
	</head>
	<body>
		<div id="app">
			<ul>
				<li v-for="(item,index) in movies"
						:class="{active:currentIndex ===index}"
						@click="liclick(index)"
				>{{index}}.{{item}}</li>
			</ul>
			
		</div>
		
		<script type="text/javascript">
			
			const app = new Vue({
				el:'#app', 
				data:{ 
					movies:['xxxx','aaaa','bbbb','cccc'],
					currentIndex:0
				},
				methods:{
					liclick(index){
						this.currentIndex = index
					}
				}
			})
			
		</script>
	</body>
</html>
